use redius::client::RedisClient;

pub(crate) async fn lpush(client: &RedisClient) {
    match client.list_lpush_more("list1", &["bv", "1", "3"]).await {
        Ok(num) => {
            log::info!("len = {num}");
        }
        Err(err) => {
            log::error!("{err}");
        }
    }
}

pub(crate) async fn lmove(client: &RedisClient) {
    match client
        .list_lmove(
            "mylist1",
            "mylist2",
            redius::commands::ListPosition::Left,
            redius::commands::ListPosition::Left,
        )
        .await
    {
        Ok(num) => {
            log::info!("{num:?}");
        }
        Err(err) => {
            log::error!("{err}");
        }
    }
}

pub(crate) async fn blpop(client: &RedisClient) {
    match client.list_blpop("mylist1", 25).await {
        Ok(num) => {
            log::info!("{num:?}");
        }
        Err(err) => {
            log::error!("{err}");
        }
    }
}

